$(document).ready(function(){
	$('.login').live('click',function(){
		var username = $('input[name=username]').attr('value');
		var password = $('input[name=password]').attr('value');
		$.post('/interface/modules/login/index.php',{username:username,password:password,method:'login'},function(data){
				$('.session > *').remove();
				$('.session').html(data);
		})
	})
	
	$('#logout').live('click',function(){
		$.post('/interface/modules/login/index.php',{method:'logout'},function(data){
			document.location='/';
		})
	})
})